﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using DAO;

namespace EngineeringMaster.Teacher
{
    public partial class EditTeacherDesc : System.Web.UI.Page
    {
        private TeacherDAO teacherDao = new TeacherDAO();
        private string teacherId;
        protected void Page_Load(object sender, EventArgs e)
        {
           
            teacherId = Session["teacherId"].ToString().Trim();
            if (teacherId == null || teacherId.Length < 1)
            {
                return;
            }
            if (!IsPostBack)
            {
                string content = teacherDao.getTeacherDescByID(teacherId);
                this.FCKeditor2.Value = content;
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            string content = this.FCKeditor2.Value;
            teacherDao.updateTeacherDesc(teacherId, content);
        }
    }
}
